package com.practice.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "weather-client", url = "http://aliv18.data.moji.com")
public interface WeatherFeignClient {

    //AQI预报5天 https://aliv18.data.moji.com/whapi/json/alicityweather/aqiforecast5days
    @PostMapping("/whapi/json/alicityweather/aqiforecast5days")
    String getAqiforecast5days(@RequestHeader String Authorization,
                               @RequestParam String cityId,
                               @RequestParam String token);

    //天气实况 https://aliv18.data.moji.com/whapi/json/alicityweather/condition
    @PostMapping("/whapi/json/alicityweather/condition")
    String getCondition(@RequestHeader String Authorization,
                         @RequestParam String cityId,
                         @RequestParam String token);
    //天气预报15天 https://aliv18.data.moji.com/whapi/json/alicityweather/forecast15days
    @PostMapping("/whapi/json/alicityweather/forecast15days")
    String forecast15days(@RequestHeader String Authorization,
                        @RequestParam String cityId,
                        @RequestParam String token);

    //天气预报24小时　https://aliv18.data.moji.com/whapi/json/alicityweather/forecast24hours
    @PostMapping("/whapi/json/alicityweather/forecast24hours")
    String forecast24hours(@RequestHeader String Authorization,
                          @RequestParam String cityId,
                          @RequestParam String token);

    //天气预警　https://aliv18.data.moji.com/whapi/json/alicityweather/alert
    @PostMapping("/whapi/json/alicityweather/alert")
    String alert(@RequestHeader String Authorization,
                           @RequestParam String cityId,
                           @RequestParam String token);

    //生活指数　https://aliv18.data.moji.com/whapi/json/alicityweather/index
    @PostMapping("/whapi/json/alicityweather/index")
    String life(@RequestHeader String Authorization,
                           @RequestParam String cityId,
                           @RequestParam String token);

    //空气质量指数　https://aliv18.data.moji.com/whapi/json/alicityweather/aqi
    @PostMapping("/whapi/json/alicityweather/aqi")
    String AirQuality(@RequestHeader String Authorization,
                           @RequestParam String cityId,
                           @RequestParam String token);
    //限行数据　https://aliv18.data.moji.com/whapi/json/alicityweather/limit
    @PostMapping("/whapi/json/alicityweather/limit")
    String limit(@RequestHeader String Authorization,
                           @RequestParam String cityId,
                           @RequestParam String token);

}
